/**故障告警 */
import * as React from "react";
import Search, { SearchState } from "./compontents/Search";
import SearchTable from "./compontents/SearchTable";
import "./index.less";
export interface FaultWarnProps {}

export interface FaultWarnState {
  pageSize: number;
  pageIndex: number;
  total: number;
  condition: SearchState;
}

class FaultWarn extends React.Component<FaultWarnProps, FaultWarnState> {
  state = {
    pageSize: 10,
    pageIndex: 1,
    total: 0,
    condition: { startDate: null, endDate: null, likeStr: "" },
  };
  render() {
    return (
      <div className="FaultWarn">
        <Search
          onSubmit={(data: SearchState) => {
            this.setState({ condition: data });
          }}
        />
        <SearchTable condition={this.state.condition} />
      </div>
    );
  }
}

export default FaultWarn;
